home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / bbs / MAX_DoorPack.lha / MAX_DoorPack103 / DoorPack.doc next >
Text File  |  1995-08-19  |  9KB  |  248 lines

  1.  
  2.     Summary for file Descriptions:
  3.  
  4.         A C starter pack for people wishing to write doors.
  5.         Bugfixed release...
  6.  
  7.                              _______________
  8.                             |               |
  9.                             |   DOORPACK    |
  10.                             |               |
  11.                             |    v 1.03     |
  12.                             |_______________|
  13.  
  14.                               for MAX's BBS
  15.  
  16.                   Written by Paul Mclachlan of Dataline
  17.                 Call Serious Operations BBS (02) 543-0572
  18.  
  19.  
  20.             DoorPack bug-fixed and expanded by Marcin Orlowski
  21.                 Call Silver Dream!'s BBS  +48 (0)91 540431
  22.  
  23.  
  24.     INTRODUCTION:
  25.  
  26.         DoorPack is similar to DoorStarter written by Anthony Barrett,
  27.         except that DoorPack is documented much better, and the source is
  28.         written in C.  This was done for two reasons:
  29.  
  30.                 a)  There was no correct C code for Doors in MAX's.
  31.                 Programmers had to re-invent the wheel for every door.
  32.  
  33.                 b)  Only one other person knew nearly enough about writing
  34.                 doors for MAX's, and they program in BASIC!  So, I
  35.                 gathered everything together and produced the definitive
  36.                 MAX Doors pack.
  37.  
  38.     NEW IN VERSION 1.01:
  39.  
  40.         In version 1.01, code supplied by Robert Masters has been placed
  41.         at the end of the DoorPack.h header file which deals with the MAX
  42.         config files.  They are a group of structures that will make
  43.         reading and utilising these structures much easier.  Thanks
  44.         Robert!
  45.  
  46.     NEW IN VERSION 1.03:
  47.  
  48.       AS BUGFIX:
  49.  
  50.         Well... this doorpack is very useful thing for all
  51.         the people who wants to write its own door for MAX's
  52.         BBS, and thanks to DataLine for creating it.
  53.         Unfortunately, as almost every software worldwide,
  54.         the little, but very annoying bug was also included
  55.         to this pack, which caused bad reference to MAX's
  56.         config file. The thing is that SERIAL_DEV_UNIT is
  57.         stored by MAX's as WORD not as ULONG! And that the
  58.         point is. And all goes right until you want to read
  59.         any data lying after SERIAL_DEV_UNIT field. I guess
  60.         you want to, because all sections description are
  61.         stored exactly there...
  62.  
  63.       AS EXPANSION:
  64.   
  65.         Some #defines have been made to easy use getsvar() and getsnum()
  66.         (see the end of the doorpack.h).
  67.         
  68.  
  69.                                                 Marcin Orlowski
  70.                                           (carlos@univ.szczecin.pl)
  71.  
  72.  
  73.     USAGE:
  74.  
  75.         To actually use the doorpack is simplicity itself (providing you
  76.         can program in C).  Simply LINK the DoorPack.o with your code, and
  77.         your code should start with dmain() instead of main().  Main() is
  78.         actually defined in DoorPack.o, which automatically sets up the
  79.         door ports and everything.  Then, simply call the routines as
  80.         required.  As an example, to write a door which writes: "Hello BBS
  81.         World!" when run (a stupid silly, but small example):
  82.  
  83.                 #include "DoorPack.h"
  84.                 void dmain( void )
  85.                     {
  86.                     sendmessage( "Hello BBS World!", 1 );
  87.                     }
  88.  
  89.         See!  Its that easy.  A guide to the individual routines follows.
  90.  
  91.     REFERENCE:
  92.  
  93.         As you can see from the header file, there are more than a few
  94.         functions defined.  The actual descriptions of these are listed
  95.         here:
  96.  
  97.         void end( void );
  98.  
  99.             This routine prematurely ends the Door.  If called your door
  100.             will exit totally.  Not really needed.  Just return from
  101.             dmain, as it is automatically called after dmain.  btw - NEVER
  102.             exit(); from dmain.  This is exceptionally bad.
  103.  
  104.         void getsvar( int typ, char *mstring );
  105.  
  106.             This routine gets some string variables about the user or
  107.             MAX's, depending upon typ:
  108.  
  109.                 1: Users name
  110.                 2: Users password
  111.                 3: Suburb
  112.                 4: Users City? (paragon function)
  113.                 5: Users state (paragon function)
  114.                 6: Users post/zip code (paragon function)
  115.                 7: Path to the doors
  116.                 8: main BBS path
  117.                 9: Date
  118.                 10: Time
  119.                 100: Phone number
  120.                 101: Computer type
  121.                 102: Comment (as defined by Sysop)
  122.  
  123.             The returned string is written in your buffer mstring.
  124.  
  125.         void sendmessage( char mstring[], int nl );
  126.  
  127.             This routine outputs the string mstring from the door.  The nl
  128.             is set to 1 if you want a cr/lf sequence sent after the
  129.             string, or 0 if you do not want this.
  130.  
  131.         void hotkey( char mstring[], char *ostring );
  132.  
  133.             This routine outputs the string mstring, and waits for a key
  134.             to be hit.  This key that was hit is stored in ostring[0].
  135.  
  136.         void prompt( char mstring[], char *ostring, int len );
  137.  
  138.             This routine displays mstring, and allows the user to enter a
  139.             string.  This is returned in ostring.  MAX will not allow the
  140.             string returned to exceed len characters.
  141.  
  142.         void sprompt( char mstring[], char *ostring, int len );
  143.  
  144.             This is the same as prompt, except it will also handle stacked
  145.             commands correctly.  (If you use a / in your command, then
  146.             everything after the / is for the next line that comes up -
  147.             under paragon anyway.)
  148.  
  149.     void showfile( char mstring[] );
  150.  
  151.             This TYPE's a file from the door.  It will output the file to
  152.             the BBS - just like the type command, except to the board.
  153.  
  154.     void twituser( void );
  155.  
  156.             This will cause MAX's to hang up.
  157.  
  158.     void addtime( int howmuch );
  159.  
  160.             This will add howmuch time to the users current remaining
  161.             time.  This howmuch can also be negative, subtracting time.
  162.  
  163.     void newaccess( int now );
  164.  
  165.             This sets the users access to now.
  166.  
  167.     void MenuFunction( int function, int extra, char *string );
  168.  
  169.             This command executes the MAX's BBS menu function specified.
  170.             This is exactly the same as in the configuration of the menus.
  171.             The function (1-33) is the menu function ie, 3 will page the
  172.             sysop etc. (See Menufunctions.text on the MAX's disk), while
  173.             extra is the extra of that function, and string is the string
  174.             of that function.
  175.  
  176.     void localmessage( char mstring[], int nl );
  177.  
  178.             This will output a string that is only visible on the local
  179.             MAX's screen. ie, it is not sent through the modem.  nl is the
  180.             same as for sendmessage.
  181.  
  182.     void putmodemchar( char outd );
  183.  
  184.             This will output a character to the modem only (not visible to
  185.             the screen).
  186.  
  187.     void putscreenchar( char outd );
  188.  
  189.             This will output a character to the screen (local) only.
  190.  
  191.     void putdoorchar( char outd );
  192.  
  193.             This will output a character to the screen and modem,
  194.             as normal.
  195.  
  196.     void editfile( char mstring[], int maxlines );
  197.  
  198.             This will edit the filename contained in mstring, which it
  199.             will not allow to exceed maxlines in length.
  200.  
  201.     int chkfile( char *filename );
  202.  
  203.             This will check to see if filename is available to MAX's.
  204.             Returns 1 if it is available, or -1 if it is locked or not
  205.             found.  This command accepts wildcards, and if so, will return
  206.             in filename the actual name of the file that it found.
  207.  
  208.     int getsnum( int typ );
  209.  
  210.             This is sort of the same as getsvar, except that it gets
  211.             integer information about the user.  a Typ of:
  212.  
  213.                 1:  Access Level
  214.                 2:  Expert mode?  (Paragon)
  215.                 3:  Net Credits?  (paragon)
  216.                 4:  Number of calls
  217.                 5:  Calls to system
  218.                 6:  Graphics mode
  219.                 7:  Minutes remaining
  220.                 8:  Screen columns
  221.                 9:  Screen rows
  222.  
  223.  
  224.     ALSO IN THE ARCHIVE:
  225.  
  226.         Also included in this archive is the various offsets in the MAX's
  227.         config files, ie:  file.data, file.index, bbs.config, etc.  These
  228.         were kindly supplied by Randy Quick.  These files are necessary if
  229.         you need to do anything really serious with some different aspects
  230.         of the doors.  They allow you to find out everything that MAX's
  231.         keeps on disk about the configuration of the BBS.
  232.  
  233.  
  234.     FINALLY:
  235.  
  236.         Dataline is a group of coders and artists committed to producing
  237.         software for the Amiga.  Consisting of:
  238.  
  239.                     Paul Mclachlan  (coding)
  240.                     Lee Adamson (coding)
  241.                     Chris Burton (coding)
  242.                     Lada Trejbal (music)
  243.  
  244.         You can contact us on the Dataline support board (02) 543-0572.  I
  245.         (Paul Mclachlan) am sysop on the board.  Alternatively you can
  246.         contact us through MAX's NET.
  247.  
  248.